package day11;

/**
 * @author joker
 * @date 2022/4/21 0021 - 21:45
 */
public class Test03 {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Person.getA()+"****1");
                try {
                    Person.setA(100);
                    Thread.sleep(10000);
                    System.out.println(Person.getA()+"****2");


                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Person.getA()+"****3");
                Person.setA(2);
                System.out.println(Person.getA()+"****4");

            }
        }).start();
    }
}
